<!DOCTYPE HTML>
<html>
<head>
<!--#header start-->
{include file="public/_meta" /}
<!--#header end-->
<title>教材分类列表</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span> 教材管理
	<span class="c-gray en">&gt;</span> 教材分类
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
<div class="page-container">
	<div class="cl pd-5 bg-1 bk-gray" style="margin-bottom:10px;">
		 <span class="l">
			  <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius">
					<i class="Hui-iconfont">&#xe6e2;</i>
					批量删除
				</a>
			  <a class="btn btn-primary radius" href="javascript:;" onclick="admin_add('添加分类','{:url('Classwork/create')}','550', '250')">
				 <i class="Hui-iconfont">&#xe600;</i>
				  添加分类
				</a>
			</span>
			<!-- <span class="r">共有数据：<strong>3</strong> 条</span>  -->
	</div>
	<table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
			<tr>
				<th scope="col" colspan="11">教材列表</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th width="40">分类ID</th>
				<th width="150">分类名称</th>
				<th width="150">添加时间</th>
				<th width="150">教材数量</th>
				<th width="90">状态</th>
				<th width="90">操作</th>
			</tr>
		</thead>
		<tbody>
            <tr class="text-c">
				<td><input type="checkbox" value="1" name=""></td>
				<td>1</td>
				<td>大学数学</td>
				<td>2017-6-5 15:16:05</td>
				<td>5</td>
				<td>使用中</td>
				<td>
					<a class="btn btn-warning-outline radius size-MINI" title="编辑" href="javascript:;" onclick="admin_edit('分类编辑','{:url('Classwork/create')}','350', '250')" style="text-decoration:none">
						<i class="Hui-iconfont">&#xe6df;</i>
					</a>
					<a class="btn btn-danger-outline radius ml-5 size-MINI" title="删除" href="javascript:;" onclick="admin_del(this,'')" style="text-decoration:none">
						<i class="Hui-iconfont">&#xe6e2;</i>
					</a>
				</td>
			</tr>
			 <tr class="text-c">
				<td><input type="checkbox" value="1" name=""></td>
				<td>2</td>
				<td>大学英语</td>
				<td>2017-6-5 15:16:05</td>
				<td>5</td>
				<td>使用中</td>
				<td>
					<a class="btn btn-warning-outline radius size-MINI" title="编辑" href="javascript:;" onclick="admin_edit('分类编辑','{:url('Classwork/create')}','350', '250')" style="text-decoration:none">
							<i class="Hui-iconfont">&#xe6df;</i>
						</a>
					<a class="btn btn-danger-outline radius ml-5 size-MINI" title="删除" href="javascript:;" onclick="admin_del(this,'')" style="text-decoration:none">
							<i class="Hui-iconfont">&#xe6e2;</i>
					</a>
				</td>
			</tr>

		</tbody>
	</table>
</div>

<!--#header start-->
{include file="public/_footer" /}
<!--#header end-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__ADMIN__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$('.table-sort').dataTable({
	 'ordering':  true,
     "iDisplayLength": 50
});
	/*房间-添加*/
	function admin_add(title,url,w,h){
		layer_show(title,url,w,h);
	}
	/*房间-查看详情*/
	function admin_see(title,url,w,h){
		layer_show(title,url,w,h);
	}
	/*房间-编辑*/
	function admin_edit(title,url,id,w,h){
		layer_show(title,url+'?id='+id,h,w);
	}

	/*结束课程*/
	function admin_out(obj,id){
		layer.confirm('课程结束不可撤回，确认取消课程？',function(index){
			$.ajax({
				type: 'DELETE',
				url: "{:url('AdminUser/delete')}",
				data:{id:id},
				dataType: 'json',
				success: function(data){
          if(data.state){
						layer.msg(data.msg,{icon:1,time:1000});
					}else {
            layer.msg(data.msg,{icon:5,time:1000});
					}
				},
				error:function(data) {
					//console.log(data.msg);
				},
			});
		});
	}

</script>
</body>
</html>
